
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>安装 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-theme-vuejs/vue.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="build.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    文档信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="build.html">
            
                <a href="build.html">
            
                    
                    项目构建
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="link.html">
            
                <a href="link.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    基础使用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="initMap.html">
            
                <a href="initMap.html">
            
                    
                    初始化地图
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="loadJXMap.html">
            
                <a href="loadJXMap.html">
            
                    
                    加载江西地图
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="LayerSwitcher.html">
            
                <a href="LayerSwitcher.html">
            
                    
                    底图切换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="addPoints.html">
            
                <a href="addPoints.html">
            
                    
                    添加点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="addLine.html">
            
                <a href="addLine.html">
            
                    
                    添加线
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="addPolygon.html">
            
                <a href="addPolygon.html">
            
                    
                    添加面
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="CustomCIrcle.html">
            
                <a href="CustomCIrcle.html">
            
                    
                    周边搜索圆
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    进阶
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="CoordsTransform.html">
            
                <a href="CoordsTransform.html">
            
                    
                    坐标转换
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    类说明
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="class.html">
            
                <a href="class.html">
            
                    
                    map
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h2>
<h3 id="&#x5F00;&#x53D1;&#x7248;&#x672C;">&#x5F00;&#x53D1;&#x7248;&#x672C;</h3>
<blockquote>
<p>&#x91CD;&#x8981;: Github &#x4ED3;&#x5E93;&#x7684; /dist &#x6587;&#x4EF6;&#x5939;&#x53EA;&#x6709;&#x5728;&#x65B0;&#x7248;&#x672C;&#x53D1;&#x5E03;&#x65F6;&#x624D;&#x4F1A;&#x66F4;&#x65B0;&#x3002;&#x5982;&#x679C;&#x60F3;&#x8981;&#x4F7F;&#x7528; Github &#x4E0A; HMap &#x6700;&#x65B0;&#x7684;&#x6E90;&#x7801;&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x81EA;&#x5DF1;&#x6784;&#x5EFA;&#x3002;</p>
</blockquote>
<pre class="language-"><code class="lang-bash"><span class="token function">git</span> clone https://github.com/smileFDD/HMap.git
<span class="token function">npm</span> <span class="token function">install</span>
<span class="token function">npm</span> run dev
<span class="token function">npm</span> run build
</code></pre>
<h3 id="amd-&#x6A21;&#x5757;&#x52A0;&#x8F7D;&#x5668;">AMD-&#x6A21;&#x5757;&#x52A0;&#x8F7D;&#x5668;</h3>
<blockquote>
<p>&#x72EC;&#x7ACB;&#x4E0B;&#x8F7D;&#x7248;&#x672C;&#x5DF2;&#x7528; UMD &#x5305;&#x88C5;&#xFF0C;&#x56E0;&#x6B64;&#x5B83;&#x4EEC;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7528;&#x4F5C; AMD &#x6A21;&#x5757;&#x3002;</p>
</blockquote>
<pre class="language-"><code class="lang-html"><span class="token doctype">&lt;!DOCTYPE html&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>&#x52A0;&#x8F7D;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x5730;&#x56FE;<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>link</span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>stylesheet<span class="token punctuation">&quot;</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>../dist/HMap.css<span class="token punctuation">&quot;</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>text/css<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>map<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>../dist/HMap.js<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<h3 id="es6&#x65B9;&#x5F0F;&#x5F15;&#x5165;">ES6&#x65B9;&#x5F0F;&#x5F15;&#x5165;</h3>
<blockquote>
<p>vue&#x548C;angular2&#x642D;&#x914D;es6&#x4F7F;&#x7528;&#x65F6;&#x53EF;&#x4EE5;&#x91C7;&#x7528;</p>
</blockquote>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">import</span> HMap <span class="token keyword">from</span> <span class="token string">&apos;../dist/HMap&apos;</span>
<span class="token keyword">let</span> Maps <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">HMap<span class="token punctuation">.</span>Map</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
Maps<span class="token punctuation">.</span><span class="token function">initMap</span><span class="token punctuation">(</span><span class="token string">&apos;map&apos;</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
  view<span class="token punctuation">:</span> <span class="token punctuation">{</span>
    center<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token comment" spellcheck="true">// constrainRotation: false, // &#x65CB;&#x8F6C;&#x89D2;&#x5EA6;&#x7EA6;&#x675F;</span>
    enableRotation<span class="token punctuation">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment" spellcheck="true">// &#x662F;&#x5426;&#x5141;&#x8BB8;&#x65CB;&#x8F6C;</span>
<span class="token comment" spellcheck="true">//      extent: [],</span>
<span class="token comment" spellcheck="true">//      maxResolution: 0, // &#x975E;&#x5FC5;&#x987B;&#x53C2;&#x6570;</span>
<span class="token comment" spellcheck="true">//      minResolution: 0, // &#x975E;&#x5FC5;&#x987B;&#x53C2;&#x6570;</span>
<span class="token comment" spellcheck="true">//      maxZoom: 19, // &#x975E;&#x5FC5;&#x987B;&#x53C2;&#x6570;</span>
<span class="token comment" spellcheck="true">//      minZoom: 0, // &#x975E;&#x5FC5;&#x987B;&#x53C2;&#x6570;</span>
    projection<span class="token punctuation">:</span> <span class="token string">&apos;EPSG:3857&apos;</span><span class="token punctuation">,</span>
    rotation<span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    zoom<span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token comment" spellcheck="true">// resolution</span>
    zoomFactor<span class="token punctuation">:</span> <span class="token number">2</span> <span class="token comment" spellcheck="true">// &#x7528;&#x4E8E;&#x7EA6;&#x675F;&#x5206;&#x53D8;&#x7387;&#x7684;&#x7F29;&#x653E;&#x56E0;&#x5B50;&#xFF08;&#x9AD8;&#x5206;&#x8FA8;&#x7387;&#x8BBE;&#x5907;&#x9700;&#x8981;&#x6CE8;&#x610F;&#xFF09;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>Maps<span class="token punctuation">)</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="build.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 项目构建">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"安装","level":"1.3","depth":1,"next":{"title":"基础使用","level":"1.4","depth":1,"ref":"","articles":[{"title":"初始化地图","level":"1.4.1","depth":2,"path":"initMap.md","ref":"initMap.md","articles":[]},{"title":"加载江西地图","level":"1.4.2","depth":2,"path":"loadJXMap.md","ref":"loadJXMap.md","articles":[]},{"title":"底图切换","level":"1.4.3","depth":2,"path":"LayerSwitcher.md","ref":"LayerSwitcher.md","articles":[]},{"title":"添加点","level":"1.4.4","depth":2,"path":"addPoints.md","ref":"addPoints.md","articles":[]},{"title":"添加线","level":"1.4.5","depth":2,"path":"addLine.md","ref":"addLine.md","articles":[]},{"title":"添加面","level":"1.4.6","depth":2,"path":"addPolygon.md","ref":"addPolygon.md","articles":[]},{"title":"周边搜索圆","level":"1.4.7","depth":2,"path":"CustomCIrcle.md","ref":"CustomCIrcle.md","articles":[]}]},"previous":{"title":"项目构建","level":"1.2","depth":1,"path":"build.md","ref":"build.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","theme-vuejs@git+https://github.com/pearofducks/gitbook-plugin-theme-vuejs.git","-fontsettings","-highlight","github","livereload"],"root":"./api","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/smileFDD/HMap.git"},"livereload":{},"search":{},"theme-vuejs":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":false,"twitter":false,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"编辑此页","base":"https://github.com/smileFDD/HMap/tree/master/docs/api"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"links":{"sharing":{"facebook":false,"twitter":false}},"gitbook":">3.0.0"},"file":{"path":"link.md","mtime":"2017-03-18T03:22:18.352Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-03-18T05:20:47.112Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    

    </body>
</html>

